home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
amigaos4_only
/
spaceagent50_4
/
documentation
/
commodities
/
spaceagent.readme
next >
Wrap
Text File
|
2004-08-03
|
7KB
|
123 lines
SpaceAgent 50.4
SpaceAgent is a full commodity that will monitor any valid system volumes for disk space
which is below a predefined threshold setup by the user.
Running SpaceAgent is easy, double click the icon, or type SpaceAgent into a shell (you
will need to specify some parameters - more below).
ToolTypes
The tooltypes listed below can also be used as CLI arguments, and as such require no
further description.
VOLUMES These are the AmigaDOS volumes to watch, they must
obviously be valid disks or errors will occur. The default is set to
'SYS:' as that disk should always exist. Multiple disks can be defined
if more than one is required. This is achieved by using the | symbol
to separate the volumes - eg: VOLUMES=SYS:|Work:|Play:
INFO This is the threshold level that is set to notify you that
the disks are approaching low space. You can set this to whatever
you want, but the default is 20. This value is in MB and is
rounded down to the next whole value. This is a global value and
will apply to all disks specified.
WARN Here is where the critical threshold is set, and the default is
1MB, but again you can set it to whatever you feel fits your
needs better. This, like INFO, is also a global value.
SECS This has been included for convenience really, and this value
represents the number of seconds to wait between disk scans. A
reasonable default is 30, but you may want to set this to 60. There
is very little happening during a disk scan, so do not be too
worried about it stealing valuable CPU cycles if set too often.
The more often the disk is scanned the quicker you will know about
the low space situation.
CX_PRIORITY This is the definable priority that the commodity will run at. The
higher the value, the closer to the top of the commodity chain this
program will run. An ideal value (and default) is 0 (zero), but must
be within the range of -127 to 127.
INFOSCRIPT This tooltype allows you to specify an AmigaDOS script that can
be executed in the event of the INFO threshold being reached. The
script is run via the system Execute() routine just prior to the requester
appearing. You should supply the full path to the script.
An important note here is that any scripts you choose must have the
'S' bit set otherwise an error will occur.
WARNSCRIPT This is as above except the script is run just prior to the WARNING
requester appearing. These are global scripts and will be run no
matter which disk triggered the event. Please note this script needs
the 'S' bit set as above.
DEBUG This tooltype should not normally be used, but is included in these
early releases to enable some fault finding.
A typical command line would look like: 'SpaceAgent VOLUMES=OS4:|Work: INFO=20 WARN=5 SECS=60'
A Brief Overview
The operation of the program is simple. After it has started it will sit quietly in the
background watching the disks you specified in the parameters. Once the free space on any
of the disks gets lower than the INFO level, a requester will appear to inform you of this
situation. If allowed to continue the requester will appear once for evey scan, so by
default that will be once every 30 seconds. Pressing 'CANCEL' will not cancel the operation
of the program, but it will supress the requester for the disk in question. SpaceAgent will
continue to monitor the disks looking for the warning situation, and will again show a
requester once this threshold is reached. Pressing 'CONTINUE' will allow the requesters to
keep appearing, and 'CANCEL' will supress the warnings too.
You can free up space on the volume in question, which will stop the requesters providing
you have freed sufficient space. By pressing 'CANCEL' to supress the requester for one
volume will NOT supress the requesters for further volumes, and the low space checks are
treated on a 'per disk' basis.
If you require the facility to execute an external script, you can specify the path to it
using the script tooltypes described above. Each script will run just before the requester
appears, so you may want to have it launch a program, or simply use the script to start
deleting files to free up space. The choice is yours. You must set the SCRIPT bit in the
script files properties otherwise an error will occur. This is simply 'Protect <file> +s'
on the script file in question. This script should be written in such a way as to make it
applicable to all disks that you are checking, as the script is considered global ie: it
will be launched by any disk not meeting the free space checks.
If you do not require the INFO level and just want the critical requesters to appear, set the
inform level to any value less than WARN, but remember it must be a whole value.
You can, if you really must, exit the program by issuing a break (CTRL-C) or by selecting
'REMOVE' from the commodities Exchange program. Space Agent will also quit the current
instance by running it again.
You can also enable and disable the checking of disks from Exchange by using the cycle gadget
intended for the purpose. This will stop the disk checking for all disks, and will put the
program in 'stand-by' mode.
This software has been written on an AmigaOne G4XE with AmigaOS4, and as such has been aimed
at this platform. It has not been tested locally on CyberStormPPC or Blizzard PPC hardware.
If you are using this software on that hardware, please let me know if there any problems.
The 68K version was compiled using SAS/C 6.58 running under OS4 and has been tested on a
classic Amiga 1200 running OS3.1 or better.
You can apply the DEBUG tooltype or CLI parameter which may give more helpful information
in the event that there are problems. (Hopefully, there will not be any)
I'd like to thank Brian Sharman for the 68K testing and feature enhancement requests, his help
has made this software what it is today.
I would also like to thank Philippe 'Elwood' Ferrucci for his help in testing this software on the PPC,
and for some of the helpful bug hunts and requests he has contributed.
Thanks guys !
Well that's it, there isn't much more to tell, so enjoy!
Simon Archer - bml@blueyonder.co.uk (15-05-2004)